/************************************************************************
In Application Programmer
************************************************************************/
#ifndef __FLASH_H
#define __FLASH_H

#include "mcu.h"

/// Flash 初始化
void Flash_init();

/// Flash 上锁
void Flash_lock();
/// Flash 解锁
void Flash_unlock();
/// 写 Flash 数据块
uint8_t Flash_writeBlock(uint32_t address, uint8_t blockData[FLASH_PAGE_SIZE], bool verify);

/// EEPROM 上锁
void Eeprom_lock();
/// EEPROM 解锁
void Eeprom_unlock();
/// 写 EEPROM 数据块
uint8_t Eeprom_write(void *addr, void *buff, size_t len);


#endif  // __FLASH_H
